<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="/resource/css/admin/main.css" type="text/css" rel="stylesheet" />
<link href="/resource/css/admin/right.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/resource/js/jquery.js"></script>
<script type="text/javascript" src="/resource/js/base.js"></script>
<script type="text/javascript" src="/resource/js/admin/departmentedit.js"></script>
</head>
<body>
	<div class="position"><span>您的当前位置：</span>组织机构 > <a href="./">部门管理</a> > ${(department.id == 0)?string("新建","修改")}部门</div>
	<form method="post" action="editdo" onsubmit="return checkform()">
		<div class="rightbody m">
			<div class="rightbodycontent">
				<table cellspacing="1" cellpadding="4" class="tableedit">
					<tr>
						<td>部门名称：</td>
						<td>
							<input type="text" name="name" id="name" value="${department.name!}" /> <span style="color:red">*</span>
						</td>
					</tr>
					<tr>
						<td>URL目录：</td>
						<td>
							<input type="text" name="urldirectory" id="urldirectory" value="${department.urldirectory!}" />
							使用部门分组时生成静态页面保存的目录，请使用英文字母，不要包含中文、标点等特殊符号。
						</td>
					</tr>
					<tr>
						<td>数据模型：</td>
						<td>
						    <select name="datamodelid">
		                        <option value="0" />--请选择--</option>
		                        <#list datamodels as datamodel>
		                        	<option value="${datamodel.id}"<#if department.datamodel?? && department.id gt 0 && department.datamodel.id == datamodel.id> selected</#if> />${datamodel.name}</option>
		                        </#list>
						    </select>
							部门网站对应的数据模型
						</td>
					</tr>
					<tr>
						<td>模板选择：</td>
						<td>
							<select name="template">
		                        <option value="" />--请选择--</option>
		                        <#list templatefiles as templatefile>
			                    	<#if templatefile.name?contains('.htm') && templatefile.name?starts_with('department')>
			                    		<option value="${templatefile.name}"<#if department.template?? && templatefile.name == department.template> selected</#if>>${templatefile.name}</option>
			                    	</#if>
			                    </#list>
							</select>
							部门网站对应的模板
						</td>
					</tr>
					<tr>
						<td>排序：</td>
						<td>
							<input type="text" name="sort" id="sort" value="${department.sort}" /> <span style="color:red">*</span>
						</td>
					</tr>
				</table>
				<input type="hidden" name="departmentid" value="${department.id}" />
			</div>
		</div>
		<div class="rightfoot">
			<div class="rightfootcontent">
				<input type="button" value="返 回" class="return" onclick="history.back()" />&nbsp;
	            <input type="submit" value="保 存" class="save" />
            </div>
        </div>
	</form>	
</body>
</html>